
Vue.component2('a_1_1_1_3_1', 
{    
    template: `

<div ref="body" 
:class="['row','a_1_1_1_3_1',

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


{ 'a_1_1_1_3_1_edit': data.__style.__edit_flag__ },
]"

>
  <slot name="body"></slot>
</div>
  `,  
  data:function(){  
  
    return {  
        data:{
          show_flag:true,
          width:"100%",
          class1:"center"
        }
        ,
    }    
  
  }, 
  watch:{
    'data.width':function(e){try{this.$refs.body.style.width=e}catch{}},
  
  
  },
  methods: {  
    //删除之前显示的插槽
    con_del:function(){
      try{this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
    },
    //显示当前的插槽
    con_add:function(obj){
      let dom=obj.dom;
      // console.log("初始化容器","新建一个dom");
      let new_dom=document.createElement('div');

      new_dom.setAttribute('miaobian','1');
      new_dom.innerHTML="<div  style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
    if (dom !== null) {
      // console.log("在...之前插入",new_dom,dom)
      this.$refs.body.insertBefore(new_dom, dom);
    } else {
      // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
      this.$refs.body.appendChild(new_dom);
    }
    this.con_del();
    this.old_con_dom=new_dom;
    },
    //查找 要插入的组件 位于哪一个插槽
    check_slot(dom){
      return 'body';//只有body这一个插槽 返回body
    }
  }, 
    mounted: function () {  
    }  
  } 
  );
  